<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!doctype html>
<html>
<head>
<base href="<%=basePath%>" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="apple-touch-icon-precomposed" href="i/app-icon72x72@2x.png">
<link rel="stylesheet"
	href="js/jquery-editable-select/jquery-editable-select.min.css" />
<link rel="stylesheet" href="layui/css/layui.css">
</head>
<%
	String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
%>
<body data-type="generalComponents">
		<form class="layui-form">
			<input name="RemoveId" class="zid" readonly="readonly" hidden="true">
			<br/>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">操作原因</label>
				<div class="layui-input-block">
					<textarea name="RemoveReason" placeholder="请输入操作原因" class="layui-textarea" lay-verify="required"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
	<script src="js/jquery.min.js"></script>
	<script src="layui/layui.js"></script>
	<script>
	    layui.use(['layer','form'],function(){
	    	var layer = layui.layer,
	    	     form = layui.form;
	    form.on('submit(formDemo)', function(data){
		    $.ajax({
		    	type:"POST",
		    	url:'admin/RemoveNameList',
		    	async:true,
		    	data:{
		    		RemoveId:data.field.RemoveId,
		    		RemoveReason:data.field.RemoveReason
		    	},
		    	success:function(resp){
		    		if(resp === "success"){
		    			layer.msg("操作成功",{icon:1});
		    			setInterval(function(){
		    			    var index = parent.layer.getFrameIndex(window.name);
		    				parent.layer.close(index);
		    				parent.layui.table.reload('AllTable',function(){});
		    			},1000);
		    		}else{
		    			layer.msg("操作失败",{icon:2});
		    		}
		    	}
		    });
		    return false;
	    });
	    });
	</script>
</body>

</html>
